package com.ruoyi.invoice.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.TreeEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 会计科目对象 subject
 * 
 * @author ruoyi
 * @date 2025-02-25
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Subject
{
    private static final long serialVersionUID = 1L;

    /** 科目ID */
    @TableId(type = IdType.AUTO)
    private Long subjectId;

    /** 科目编码 */
    @Excel(name = "科目编码")
    @NotBlank(message = "科目编码不能为空")
    private String subjectCode;

    /** 科目名称 */
    @Excel(name = "科目名称")
    @NotBlank(message = "科目名称不能为空")
    private String subjectName;

    /** 科目类型 */
    @Excel(name = "科目类型")
    @NotNull(message = "科目类型不能为空")
    private Long typeId;

    /** 余额方向（0-借方 1-贷方） */
    @Excel(name = "余额方向", readConverterExp = "0=-借方,1=-贷方")
    private Integer balanceDirection;

    /** 辅助核算项 */
    @Excel(name = "辅助核算项")
    private String auxiliaryItems;

    /** 启用状态 0禁用 1启用  */
    @Excel(name = "启用状态 0禁用 1启用 ")
    private Integer isEnabled;

    /** 逻辑删除 */
    private Integer isDeleted;


    @TableField(exist = false)
    private String typeName;


}
